package com.wisdytech.app.produceExecute.common;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Date;

import com.alibaba.fastjson.JSONObject;

public class ContentUtil {
	
	public static String changeContent(String queryMap,String str) {
		if(!str.isEmpty()) {
	    	try {
				queryMap= URLDecoder.decode(queryMap, "UTF-8");
			} catch (UnsupportedEncodingException e) {
				e.printStackTrace();
			}
	      	JSONObject json = JSONObject.parseObject(queryMap);
	      	JSONObject jsonO = json.getJSONObject("queryMap");
	      	String strValue = (String) jsonO.get(str);
			return strValue;
		}
		return null;

	}
	
	public static Long changeContentDate(String queryMap,String str) {
		if(!str.isEmpty()) {
	    	try {
				queryMap= URLDecoder.decode(queryMap, "UTF-8");
			} catch (UnsupportedEncodingException e) {
				e.printStackTrace();
			}
	      	JSONObject json = JSONObject.parseObject(queryMap);
	      	JSONObject jsonO = json.getJSONObject("queryMap");
	      	Long strValue = (Long) jsonO.get(str);
			return strValue;
		}
		return null;

	}

}
